<template>
  <div>
    <!-- 引入头部组件 -->
    <shopheader/>
    <div class="tab">
      <div class="tab-item">
        <router-link to="/shop/shopgood">点餐</router-link>
      </div>
      <div class="tab-item">
        <router-link to="/shop/shoprating">评级</router-link>
      </div>
      <div class="tab-item">
        <router-link to="/shop/shopinfo">商家</router-link>
      </div>
    </div>
    <!-- //缓存路由组件对象             =====加个缓存-->
    <keep-alive>
      <router-view></router-view>
    </keep-alive>
    <!-- <shopfooter/> -->
  </div>
</template>
<script>
//引入头部组件和底部组件
import shopheader from "./shopheader.vue";
// import shopfooter from "./shopfooter.vue";
import { mapState } from "vuex";
export default {
  data() {
    return {};
  },
  mounted() {},
  computed: {},
  components: {
    shopheader
  }
};
</script>
<style lang="stylus">
@import '../../common/stylus/mixins.styl';

.tab {
  height: 40px;
  line-height: 40px;
  background: #fff;
  bottom-border-1px(rgba(7, 17, 27, 0.1));

  .tab-item {
    float: left;
    width: 33.33333%;
    text-align: center;
    font-size: 14px;
    color: rgb(77, 85, 93);

    a {
      display: block;
      position: relative;

      &.router-link-active {
        color: #02a774;

        &::after {
          content: '';
          position: absolute;
          left: 50%;
          bottom: 1px;
          width: 35px;
          height: 2px;
          transform: translateX(-50%);
          background: #02a774;
        }
      }
    }
  }
}
</style>
